using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._ServerTools._Publishing
{
    /// <summary>
    /// <para>Stage Service</para>
    /// <para>Stages a service definition. A staged service definition file (.sd) contains all the necessary information to share a web layer, web tool, or service.</para>
    /// <para>暂存服务定义。暂存服务定义文件 （.sd） 包含共享 Web 图层、Web 工具或服务所需的所有信息。</para>
    /// </summary>    
    [DisplayName("Stage Service")]
    public class StageService : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public StageService()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_service_definition_draft">
        /// <para>Service Definition Draft</para>
        /// <para>The input draft service definition. Service definition drafts can be created using the arcpy.sharing module or the CreateGeocodeSDDraft, CreateGPSDDraft, or CreateImageSDDraft ArcPy functions.</para>
        /// <para>输入草稿服务定义。可以使用 arcpy.sharing 模块或 CreateGeocodeSDDraft、CreateGPSDDraft 或 CreateImageSDDraft ArcPy 函数创建服务定义草稿。</para>
        /// </param>
        /// <param name="_out_service_definition">
        /// <para>Service Definition</para>
        /// <para>The resulting service definition. The default is to write the service definition to the same directory as the draft service definition.</para>
        /// <para>生成的服务定义。缺省情况下，将服务定义写入与草稿服务定义相同的目录。</para>
        /// </param>
        public StageService(object _in_service_definition_draft, object _out_service_definition)
        {
            this._in_service_definition_draft = _in_service_definition_draft;
            this._out_service_definition = _out_service_definition;
        }
        public override string ToolboxName => "Server Tools";

        public override string ToolName => "Stage Service";

        public override string CallName => "server.StageService";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_service_definition_draft, _out_service_definition, _staging_version];

        /// <summary>
        /// <para>Service Definition Draft</para>
        /// <para>The input draft service definition. Service definition drafts can be created using the arcpy.sharing module or the CreateGeocodeSDDraft, CreateGPSDDraft, or CreateImageSDDraft ArcPy functions.</para>
        /// <para>输入草稿服务定义。可以使用 arcpy.sharing 模块或 CreateGeocodeSDDraft、CreateGPSDDraft 或 CreateImageSDDraft ArcPy 函数创建服务定义草稿。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Service Definition Draft")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_service_definition_draft { get; set; }


        /// <summary>
        /// <para>Service Definition</para>
        /// <para>The resulting service definition. The default is to write the service definition to the same directory as the draft service definition.</para>
        /// <para>生成的服务定义。缺省情况下，将服务定义写入与草稿服务定义相同的目录。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Service Definition")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_service_definition { get; set; }


        /// <summary>
        /// <para>Staging Version</para>
        /// <para><xdoc>
        ///   <para>The version of the published service definition.</para>
        ///   <para>When sharing a feature, a tile, or an imagery layer to ArcGIS Enterprise, use 5 for the value. When sharing a map image layer or web tool to ArcGIS Enterprise, and any layer type to ArcGIS Online, use 102. This is the default.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>已发布服务定义的版本。</para>
        ///   <para>将要素、切片或影像图层共享到 ArcGIS Enterprise 时，请使用 5 作为值。将地图图像图层或 Web 工具共享到 ArcGIS Enterprise 以及将任何图层类型共享到 ArcGIS Online 时，请使用 102。这是默认设置。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Staging Version")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long? _staging_version { get; set; } = null;


        public StageService SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}